<template>
    <view class="users-select-container">
        <view class="text">业务员：</view>
        <view class="name-wrapper flex-s-c" @click="openUserDrawer">
            <view class="name">{{ selectedSalesman ? selectedSalesman.FullName : "请选择业务员" }}</view>
            <uni-icons type="forward" size="30"></uni-icons>
        </view>
    </view>
</template>

<script>
import { mapState } from "vuex"

export default {
    emits: ["openUserDrawer"],
    computed: {
        ...mapState("report", ["selectedSalesman"]),
    },
    methods: {
        openUserDrawer() {
            this.$emit("openUserDrawer")
        },
    },
}
</script>

<style lang="scss">
.users-select-container {
    display: flex;
    align-items: center;
    padding: 24rpx 28rpx 24rpx 32rpx;
    color: $color-gray-1;
    font-size: 28rpx;

    .text {
        font-weight: 700;
    }

    .name-wrapper {
        flex: 1;
        height: 72rpx;
        padding: 16rpx 32rpx;
        box-sizing: border-box;
        border-radius: 8rpx;
        background-color: $color-gray-5;
    }
}
</style>
